#{extends 'relationsHome.html' /} 
#{set title:'Relation' /}

<form action="@{Relations.addTagRelation()}" method="POST">
<br/>
<tr><td><b>Tags Relation Creation</b><hr></hr></td></tr>

<p>
Source
#{if tag.size() > 0 }
#{select 'source', value:1, id:'select1'}
   #{option None}None#{/option}
    #{list items:0..tag.size()-1, as:'i'}
      #{option tag.get(i).name}${tag.get(i).name}#{/option}
    #{/list}
#{/select}
#{/if}
#{else}
    No Tags
#{/else}
</p>

<p>
Name
#{if task.size() > 0 }
    #{select 'relationName', value:1, id:'select2'}
    #{option None}None#{/option}
    #{list items:0..task.size()-1, as:'i'}
    #{option task.get(i).relationName} ${task.get(i).relationName} #{/option}
    #{/list}
    #{/select}
#{/if}
#{else}
    No Relation Names
#{/else}
</p>

<p>
Destination
#{if tag.size() > 0 }
#{select 'destination', value:1, id:'select3'}
      #{option None}None#{/option}
    #{list items:0..tag.size()-1, as:'i'}
      #{option tag.get(i).name}${tag.get(i).name}#{/option}
    #{/list}
#{/select}
#{/if}
#{else}
    No Tags
#{/else}
</p>
#{if flash.error}
    <p style="color:#c00">
        ${flash.error}
    </p>
#{/if}

<tr><td>&nbsp;</td><td><input type="submit" value="Add">
</form>
